home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
schedctl.h.z
/
schedctl.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
3KB
|
105 lines
/**************************************************************************
* *
* Copyright (C) 1986, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef __SYS_SCHEDCTL_H__
#define __SYS_SCHEDCTL_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 3.15 $"
#include "sys/sysmp.h"
/* defines for schedctl() commands */
#define NDPRI MPTS_RTPRI
#define SLICE MPTS_SLICE
#define RENICE MPTS_RENICE
/*
* Additional schedctl commands. These give precise emulation of the BSD4.3
* getpriority and setpriority system calls. They may be invoked through the
* schedctl interface or by the direct system call hooks.
*/
#define RENICE_PROC MPTS_RENICE_PROC
#define RENICE_PGRP MPTS_RENICE_PGRP
#define RENICE_USER MPTS_RENICE_USER
#define GETNICE_PROC MPTS_GTNICE_PROC
#define GETNICE_PGRP MPTS_GTNICE_PGRP
#define GETNICE_USER MPTS_GTNICE_USER
/* More schedctl commands */
#define SETHINTS MPTS_SETHINTS
#define SCHEDMODE MPTS_SCHEDMODE
#define SETMASTER MPTS_SETMASTER
/* possible non-degrading priorities */
/* these priorities are higher than ALL normal user process priorities */
#define NDPHIMAX 30
#define NDPHIMIN 39
/* these priorities overlap normal user process priorities */
#define NDPNORMMAX 40
#define NDPNORMMIN 127
/* these priorities are below ALL normal user process priorities */
#define NDPLOMAX 128
#define NDPLOMIN 254
/* values for share group scheduling mode (schedctl(SCHEDMODE)) */
#define SGS_FREE 1 /* all procs schedule independently */
#define SGS_SINGLE 2 /* only one process runs */
#define SGS_EQUAL 3 /* all processes get equal share of cpu */
#define SGS_GANG 4 /* all processes gang schedule */
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
#ifndef _KERNEL
int schedctl(int, ...);
#endif
#endif
#ifdef _KERNEL
/*
* Scheduling discipline definitions
*/
#define NDISCIPLINES 3
#define SD_UNIX_SCHED 0 /* normal unix scheduling */
#define SD_GFX_SCHED 1 /* graphics scheduling discipline */
#define SD_MP_SCHED 2 /* shared process group scheduling disc */
#define SD_UNIX_MASK (1<<SD_UNIX_SCHED)
#define SD_GFX_MASK (1<<SD_GFX_SCHED)
#define SD_MP_MASK (1<<SD_MP_SCHED)
#define SD_MASK_ALL (SD_UNIX_MASK|SD_GFX_MASK|SD_MP_MASK)
struct sched_disc { /* information per discipline */
int (*sd_disc)(); /* discipline entry point */
};
struct sched_cpu { /* per cpu scheduling information */
uint sc_dvec; /* bit vector of disciplines run by the cpu */
};
extern struct sched_disc sdisc[];
extern struct sched_cpu scpu[];
/* system configurable parameter */
extern unchar ndpri_hilim, ndpri_lolim;
#endif
#ifdef __cplusplus
}
#endif
#endif /* __SYS_SCHEDCTL_H__ */